// API配置文件
const config = {
  // 开发环境
  development: {
    baseURL: 'http://12.107.3.133:9000/api',
    timeout: 10000,
    mock: false // 是否启用mock数据
  },

  // 测试环境
  test: {
    baseURL: 'https://test-api.example.com/api',
    timeout: 15000,
    mock: false
  },

  // 生产环境
  production: {
    baseURL: 'https://api.example.com/api',
    timeout: 15000,
    mock: false
  }
}

// 获取当前环境配置
const currentEnv = process.env.NODE_ENV || 'development'
console.log(currentEnv, 'currentEnv');
export const apiConfig = config[currentEnv]

// API接口地址
export const API_ENDPOINTS = {
  // 白蚁
  TERMITE: {
    SEARCH: '/termite-mb/queryMonitorPointMb',
    PROJECTNAME: '/termite-mb/queryMonitorPointMbProjectName',
    HANDLEPOINT: '/termite-mb/handleMonitorPointMb',
    GETCOMPANY: '/termite/getControlCompanyData',
    GetSectList: '/external/encryptGetSectList',
    AddressQuery: '/sh/addressQuery',
    GETCOMPANYLIST: '/termite-mb/preventionControlCompanyQuery',
    HonorQuery: '/termite-mb/preventionControlHonorQuery',
  },
  // 用户相关
  USER: {
    LOGIN: '/user/login',
    LOGOUT: '/user/logout',
    INFO: '/user/info',
    REGISTER: '/user/register'
  },

  // 上报相关
  REPORT: {
    LIST: '/report/list',
    CREATE: '/report/create',
    UPDATE: '/report/update',
    DELETE: '/report/delete',
    DETAIL: '/report/detail'
  },

  // 文件上传
  UPLOAD: {
    IMAGE: '/termite/upLoadPhoto',
    FILE: '/upload/file'
  }
} 